package org.demo.mapper;


import org.apache.ibatis.annotations.Select;
import org.demo.entity.Employee;
import org.springframework.stereotype.Repository;

/**
 * @author yexi
 */
@Repository
public interface EmployeeMapper {

    /**
     * 查询最新的雇员
     *
     * @return 最新雇员
     */
    @Select("select * from employee where emp_no = (select max(emp_no) from employee e)")
    Employee findNewestEmployee();

}
